extends Node2D




@rpc("any_peer", "call_local")
func log_str(args: Array, preffix : String = "") -> void:
	var debug_list : Control = get_tree().get_first_node_in_group("debug_list")
	var label: Label
	var pre_str : String = (preffix + " # ") if preffix else ""
	var print_str : String = pre_str
	if debug_list:
		label = Label.new()
		label.text = pre_str
		label.mouse_filter = Control.MOUSE_FILTER_IGNORE
	for i in args:
		var add_str := (str(i) + " # ")
		print_str += add_str
		if OS.is_debug_build() and debug_list:
			label.text += add_str
	print(print_str)
	if label != null:
		debug_list.add_child(label)
